package cn.codergege.shiro.chapter6.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.codergege.shiro.chapter6.dao.PermissionDao;
import cn.codergege.shiro.chapter6.model.Permission;
import cn.codergege.shiro.chapter6.service.PermissionService;

@Service("permissionService")
public class PermissionServiceImpl implements PermissionService {
	@Resource
	private PermissionDao permissionDao;

	@Override
	public Permission createPermission(Permission permission) throws Exception {
		return permissionDao.createPermission(permission);
	}

	@Override
	public void deletePermission(Long permissionId)  throws Exception {
		permissionDao.deletePermission(permissionId);
	}

}
